I found out that from Level 1 to Level 6, the system suggests the same command. So I decided to organize them into a single page, which is what you are looking at now.
Commands May Need:
ls - list directory contents
ls [OPTION]... [FILE]...
The 'ls' command is one of the most basic commands in Unix-like operating systems. When you type 'ls', it displays all the files in the specified folder (by default, it shows files in the current directory). By using the '-l' parameter or the 'l' command, you can see more details about the files in the directory, including hidden files.
cd - change the working directory
cd [-L|-P] [directory]
Cd is a very commonly used command. To change your directory, simply type cd followed by the directory you want to go to. One convenient feature is the use of relative paths. Instead of typing the absolute path, you can use '..' to go to the parent directory, and '~' to return to the home directory. Using these relative paths can simplify your commands. Additionally, both relative and absolute paths can be used for web hyperlinks. By combining these two useful tools, we can efficiently navigate through directories.
cat - concatenate files and print on the standard output
cat [OPTION]... [FILE]...
Cat is one of the easiest ways to view a file. The 'cat' command allows us to view the contents of various types of files, including jpg and gif files. Additionally, instead of using 'nano' or 'vim', we can use 'cat > file' to add text to files. For example, typing 'cat > try1 Test' will add the text 'Test' to the file 'try1'. After typing 'cat try1', the message 'Test' will be displayed.
du - estimate file space usage
du [OPTION]... [FILE]... du [OPTION]... --files0-from=F
Du, short for disk usage, displays the real size of files for the user. In comparison, 'll' (similar to 'ls -l') shows the file size, while 'du' demonstrates the disk usage. In most cases, the size reported by 'ls -l' is less than that reported by 'du'. If you're curious about this difference, please refer to References-4.
file - determine file type
[-bcdEhiklLNnprsSvzZ0] [--apple] [--exclude-quiet] [--extension] [--mime-encoding] [--mime-type] [-e testname] [-F separator] [-f namefile] [-m magicfiles] [-P name=value] file ... -C [-m magicfiles] [--help]
The 'file' command is used to determine the file type. By typing it, the output will show you the type of a file. However, a file's identification is based on its 'magic number'. Due to this factor, the result of determination could be incorrect if someone modifies or deletes the magic number. In cases where a file doesn't have a magic number, the computer will use other methods to identify the file. Additionally, if a file has multiple magic numbers, only the first one will be displayed unless any prompts are added.
find - search for files in a directory hierarchy
find [-H] [-L] [-P] [-D debugopts] [-Olevel] [starting-point...] [expression]
Just like the word 'find', the 'find' command helps us search for specific files. When you only type 'find [filename]', the system typically outputs many files, so specifying parameters becomes crucial. If you know the exact filename, simply add '-name' (e.g., 'find -name [filename]'). If you know the directory where the file is located, add the directory before the filename (e.g., 'find [directory] [filename]'). There are numerous other options that can be included, such as specifying a user or files for which you have permission. For further exploration, refer to References-8 and References-9.
References
https://man7.org/linux/man-pages/man1/
https://www.cyberciti.biz/faq/relative-pathname/
https://miahsuwork.medium.com/第一週-command-line-基本指令與操作-f4da8bcfdfa
https://www.unix.com/unix-for-dummies-questions-and-answers/13232-ls-l-du.html
https://blog.csdn.net/cgzhello1/article/details/7839534
https://ioflood.com/blog/file-linux-command/
https://www.runoob.com/linux/linux-comm-du.html
https://blog.gtwang.org/linux/unix-linux-find-command-examples/
https://www.geeksforgeeks.org/find-command-in-linux-with-examples/
ChatGPT to correct my grammar